<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Rep\MaterialDrawLogRep;
use Illuminate\Http\Request;

class MaterialDrawLog extends Controller
{
    //领料记录
    protected $rep;

    public function __construct(Request $request)
    {
        $this->rep = new MaterialDrawLogRep();
    }

    public function getMaterialDrawLogList(Request $request)
    {
        $params = $request->only([]);
        $data = $this->rep->getMaterialDrawLogListRep($params);
        return re(0,$data,'success');
    }

    public function createMaterialDrawLog(Request $request){
        $params = $request->only(['field','field_value','employee_user_id','job_type_id','material_id','num','draw_time']);
        $data = $this->rep->createMaterialDrawLogRep($params);
        return re($data['code'],$data['data'],$data['msg']);
    }


}
